<!DOCTYPE html>
<html lang="cn" xmlns:th="http://www.thymeleaf.org">

<!--顶部导航栏-->
<nav class="navbar navbar-expand-lg navbar-light bg-light" th:fragment="topNavigationBar(action)">
    <a class="navbar-brand" th:href="@{/}">Blog</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
            <li th:class="${action == 'home' ? 'nav-item active' : 'nav-item'}">
                <a class="nav-link" th:href="@{/}">首页 </a>
            </li>
            <li th:class="${action == 'category' ? 'nav-item active' : 'nav-item'}">
                <a class="nav-link" th:href="@{/toCategoryPage}">分类 </a>
            </li>
            <!--<li th:class="${action == 'tag' ? 'nav-item active' : 'nav-item'}">-->
            <!--    <a class="nav-link" th:href="@{/toTagPage}">标签 </a>-->
            <!--</li>-->
            <!--<li th:class="${action == 'disabled' ? 'nav-item active' : 'nav-item'}">-->
            <!--    <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>-->
            <!--</li>-->
        </ul>
        <!--模糊搜索标题-->
        <form class="form-inline my-2 my-lg-0" th:action="@{/blog/search}" method="get">
            <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search"
                   name="searchBlogTitle">
            <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
        </form>
    </div>
</nav>





</html>